package com.akkainaction.cluster.wordcount.router;

import akka.actor.ActorSystem;
import akka.actor.Props;
import com.akkainaction.cluster.wordcount.router.service.WordCountService;
import com.typesafe.config.ConfigFactory;

public class StartWordCountService {

    public static void main(String[] args) {
        ActorSystem system1 = ActorSystem.create("sys", ConfigFactory.load("wordcount-router-service01.conf"));
        system1.actorOf(Props.create(WordCountService.class),"wordCountService01");

        ActorSystem system2 = ActorSystem.create("sys", ConfigFactory.load("wordcount-router-service02.conf"));
        system2.actorOf(Props.create(WordCountService.class),"wordCountService02");

        ActorSystem system3 = ActorSystem.create("sys", ConfigFactory.load("wordcount-router-service03.conf"));
        system3.actorOf(Props.create(WordCountService.class),"wordCountService03");
    }
}
